<%@ page contentType="text/html;charset=utf-8"%>
<%@page isELIgnored="false"%>
<%@ taglib prefix="cw" uri="/widget-tags"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>读身份证</title>
		<cw:base />
		<script type="text/javascript"
			src="<s:url value='/resource/scripts/gridUtils.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='/resource/scripts/gridException.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='/resource/scripts/formUtils.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='/resource/scripts/storeUtils.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='/resource/scripts/utils.js'/>"></script>
		<script type="text/javascript">
			function readId(){
				var cardutil =document.getElementById("cardutilid");
				if(!cardutil){
					Ext.MessageBox.alert('提示', '请先安装读卡程序!');
					return;
				}
				
				var flag =cardutil.ReadIdCardInfo(99,'000000');
				if(flag !=0){
					Ext.MessageBox.alert('提示', cardutil.errMsg);
					return;
				}
				
				//var cardNO = '1111111111111111|                                ';
				var aae135 = cardutil.idCardNO.toString().trim().substring(0,18);
				Ext.getCmp('personSelect_aac001').setValue(aae135);
				changeStoreParams('personSelect_aac001',{query:aae135},true);				
				Ext.getCmp('personSelect_aac001').focus();	
					
			}
	
		</script>
 
	</head>

	<body>
		<object id="cardutilid"
			classid="clsid:D4851E8C-EAF0-4AE2-8F0E-AA82335556EF" width=0 height=0></object>
		<cw:button text="读身份证" onclick="readId()" id="btnCardId" ></cw:button>
		<cw:theme></cw:theme>
	</body>
	
</html>


